package com.friends.digitpic.service.service.impl;

import javax.annotation.Resource;

import org.jeecgframework.minidao.pojo.MiniDaoPage;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.stereotype.Component;
import com.friends.digitpic.service.dao.UserfavoritepicDao;
import com.friends.digitpic.service.entity.UserfavoritepicEntity;
import com.friends.digitpic.service.service.UserfavoritepicService;

/**
 * 描述：用户收藏图片
 * @author: jiangge xia
 * @since：2018年09月15日 22时44分22秒 星期六 
 * @version:1.0
 */

@Transactional
@Component
public class UserfavoritepicServiceImpl implements UserfavoritepicService {

	@Resource(name = "userfavoritepicDao")
	private UserfavoritepicDao userfavoritepicDao;


	public UserfavoritepicEntity getUserfavoritepic(String favoritepicid) {
		return userfavoritepicDao.get(favoritepicid);
	}

	public int updateUserfavoritepic(UserfavoritepicEntity userfavoritepic) {
		return userfavoritepicDao.update(userfavoritepic);
	}

	public void insertUserfavoritepic(UserfavoritepicEntity userfavoritepic) {
		userfavoritepicDao.insert(userfavoritepic);
		
	}

	public MiniDaoPage<UserfavoritepicEntity> getUserfavoritepicAll(UserfavoritepicEntity userfavoritepic, int page, int rows) {
		return userfavoritepicDao.getAll(userfavoritepic, page, rows);
	}

	public void deleteUserfavoritepic(UserfavoritepicEntity userfavoritepic) {
		userfavoritepicDao.delete(userfavoritepic);
		
	}
}
